package cn.com.shinho.hg.core.util;

import java.security.SecureRandom;
import java.util.UUID;

/**
 * @program: hg-server-parent
 * @description: ${description}
 * @author: Mr.Ye
 * @create: 2018-07-11
 **/
public class IdGen {
    private static SecureRandom random = new SecureRandom();

    public IdGen() {
    }

    public static String uuid() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    public static long randomLong() {
        return Math.abs(random.nextLong());
    }

    public static String getNextId() {
        return uuid();
    }

   /* public static void main(String[] args) {
        System.out.println(uuid());
        System.out.println(randomLong());
        System.out.println(uuid().length());
        System.out.println((new IdGen()).getNextId());
    }*/
}